home *** CD-ROM | disk | FTP | other *** search
- #!/bin/csh -f
- # 07-MAR-2000 I4.0.0.25 APB $$1 Initial submission
- #
-
- #---------------------------------------
- # Check the arguments
- #
-
- if ($#argv != 2) then
- echo "ERROR: Wrong parameters number."
- exit 1
- endif
-
- set LogFile=${2}
- set TclFile=${1}/migration/migrate_chk.tcl
-
- cat < /dev/null > $LogFile
-
- if ($status != 0) then
- echo "ERROR: Can't create output file: $LogFile"
- exit 1
- endif
-
- #---------------------------------------
- # Main block
- #
-
- if ($?PROI_HOME == 0) then
- if ($?ORACLE_HOME == 0) then
- echo "ERROR: Couldn't find environment variable ORACLE_HOME or PROI_HOME" >> $LogFile
- exit 1
- endif
- setenv PROI_HOME $ORACLE_HOME
- endif
-
- if (! -e ${TclFile}) then
- echo "ERROR: Couldn't find file ${TclFile}" >> $LogFile
- exit 1
- endif
-
- set StructureTree="intralink/"
- set TclExec=${PROI_HOME}/${StructureTree}tools/bin/tclsh
-
- if (! -e ${TclExec}) then
- set StructureTree=""
- set TclExec=${PROI_HOME}/${StructureTree}tools/bin/tclsh
- if (! -e ${TclExec}) then
- echo "ERROR: Couldn't find file ${TclExec}" >> $LogFile
- exit 1
- endif
- endif
-
- set TclLibD=${PROI_HOME}/${StructureTree}tools/lib/tcl
-
- if ($?TCL_LIBRARY == 0) then
- if (! -d ${TclLibD}) then
- echo "ERROR: Couldn't find directory ${TclLibD}" >> $LogFile
- exit 1
- else
- setenv TCL_LIBRARY ${TclLibD}
- endif
- else
- if (! -d ${TCL_LIBRARY}) then
- echo "ERROR: Couldn't find directory ${TCL_LIBRARY}" >> $LogFile
- exit 1
- endif
- endif
-
- ${TclExec} ${TclFile} ${LogFile}
-
- exit $status
-